package com.eian.boot.module.system.associations.user.dept.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.util.List;

/**
 * 用户部门分配事件
 * 当用户被分配部门时触发
 *
 * @author alex.meng
 * @since 1.0.0
 */
@Getter
public class UserDeptAssignedEvent extends ApplicationEvent {

    private final Long userId;
    private final Long mainDeptId;
    private final List<Long> partDeptIds;

    public UserDeptAssignedEvent(Object source, Long userId, Long mainDeptId, List<Long> partDeptIds) {
        super(source);
        this.userId = userId;
        this.mainDeptId = mainDeptId;
        this.partDeptIds = partDeptIds;
    }
}

